package org.apache.rocketmq.logging.inner.layouts;

import org.apache.rocketmq.logging.inner.Layout;

public class LayoutBuilder {

    private Layout layout;

    public LayoutBuilder withSimpleLayout() {
        layout = new SimpleLayout();
        return this;
    }

    public LayoutBuilder withDefaultLayout() {
        layout = new DefaultLayout();
        return this;
    }

    public Layout build() {
        if (layout == null) {
            layout = new SimpleLayout();
        }
        return layout;
    }

    public static LayoutBuilder newLayoutBuilder() {
        return new LayoutBuilder();
    }
}